::-webkit-scrollbar {
    width: 6px;
    height: 1px;
}

::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: #c0c4cc;
    opacity: 0.3;
}

::-webkit-scrollbar-track {
    border-radius: 6px;
    background: transparent;
}

.overlay {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 99;
}

.dialog {
    width: 20%;
    box-shadow: 0 0.75em 2em 0.25em rgba(0, 0, 0, .04), 0 0.5em 1.25em rgba(0, 0, 0, .08);
    margin: 30vh 15vh 0 auto;
    background: white;
}

.dialog-header {
    height: 3em;
    padding: 0 1em;
    background: linear-gradient(to right, #5ab0fe, #9fd9ec);
    color: white;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;

}

.dialog-header .close {
    display: inline-flex;
    width: 1em;
    height: 1em;
    font-size: 1em;
    cursor: pointer;
}

.dialog-header .title {
    font-size: 1em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.dialog-header .close:hover {
    color: black;
}

.dialog-body {
    background: white;
}

.dialog-body .scrollbar {
    height: 35vh;
    overflow: auto;
}

.dialog-body .message {
    padding: .5em 1em;
    border-top: 1px solid #E6E6E6;
}

.dialog-body .message textarea {
    width: 100%;
    display: block;
    resize: none;
    border: 0;
    font-size: 1em;
    outline: none;
    line-height: 1.5;
}

.dialog-body .send {
    text-align: right;
}

.dialog-body .send button {
    display: inline-flex;
    width: 2.5em;
    height: 1.75em;
    background: linear-gradient(to bottom, #42b4ff, #3368ff);
    color: white;
    font-size: 1em;
    padding: 0 0.625em;
    border-radius: .25em;
    outline: none;
    border: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dialog-body .send button:hover {
    opacity: 0.8;
}

.dialog-body .scrollbar ul {
    list-style-type: none;
    padding: 0 1em;
}

.dialog-body .scrollbar ul li {
    margin: 1em 0;
    display: flex;
}

.dialog-body .scrollbar ul li.user {
    justify-content: flex-end;
}

.dialog-body .scrollbar ul li.user .content {
    background: #409EFF;
    color: white;
}

.dialog-body .scrollbar ul li.user .content::before {
    display: none;
}

.dialog-body .scrollbar ul li.user .content::after {
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border-top: 0.5em solid transparent;
    border-bottom: 0.5em solid transparent;
    border-left: 0.625em solid #409EFF;
    top: 0.5em;
    right: -0.5em;
    left: auto;
}

.dialog-body .scrollbar ul li .avatar {
    width: 2em;
    height: 2em;
    background: linear-gradient(to bottom, #b9e3ff, #2fa3ff);
    overflow: hidden;
    border-radius: 50%;
    margin-right: 0.75em;
    flex-shrink: 0;
}

.dialog-body .scrollbar ul li .avatar img {
    width: 100%;
}

.dialog-body .scrollbar ul li .content {
    padding: .375em .625em;
    background: #f0f0f0;
    border-radius: .25em;
    font-size: .8125em;
    word-break: break-all;
    max-width: 79%;
    color: #606266;
    line-height: 1.5;
    position: relative;
}

.dialog-body .scrollbar ul li .content::before {
    position: absolute;
    content: '';
    width: 0;
    height: 0;
    border-top: 0.5em solid transparent;
    border-bottom: 0.5em solid transparent;
    border-right: 0.625em solid #f0f0f0;
    top: 0.5em;
    left: -0.5em;
    right: auto;
}

.dialog-body .scrollbar input[type=checkbox] {
    vertical-align: middle;
}

.dialog-body .scrollbar input[type=checkbox]:disabled {
    background-color: white;
}

.dialog-body .scrollbar input[type=checkbox]:checked {
    background-color: white;
}

.dialog-body .scrollbar p {
    margin: 0;
}

.dialog-body .scrollbar table {
    border-color: black;
}

.dialog-body .scrollbar table tr th {
    padding: .625em 1.25em;
    background: #CEDEFE33;
}

.dialog-body .scrollbar table tr td {
    padding: .625em 1.25em;
}

.dialog-body .scrollbar .chat-img {
    display: block;
    margin: 0.5em auto;
    width: 12.75em;
}

.dialog-body .scrollbar hr {
    width: 100%;
    border-top: 1px solid black;
    margin: 1em 0;
}

.dialog-body .scrollbar .ol {
    font-weight: bold;
}

.dialog-body .scrollbar em {
    display: inline-flex;
    align-items: center;
    font-style: normal;
    cursor: pointer;
    color: #409EFF;

    &:before {
        content: '';
        margin-right: .5em;
        width: 0;
        height: 0;
        border: 2px solid;
        border-radius: 50%;
    }

    &:visited {
        color: #007DFF;
    }

    &:hover {
        text-decoration: underline;
    }
}

.robot {
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, #78c8e6, #73aaff);
    position: fixed;
    right: -2.5625em;
    top: 60%;
    padding: 0 1.5em;
    color: #fff;
    height: 5.125em;
    border-radius: 1.5625em 0 0 1.5625em;
    cursor: pointer;
    transition: right .5s;
    white-space: nowrap;
    z-index: 9;
}

.robot i {
    width: 3.125em;
}

.robot:hover {
    right: 0;
}

@keyframes stretchdelay {

    0%,
    80%,
    100% {
        transform: scaleY(0.44);
        -webkit-transform: scaleY(0.44);
    }

    40% {
        transform: scaleY(1.0);
        -webkit-transform: scaleY(1.0);
    }
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.spinner {
    width: 5em;
    height: 3em;
    text-align: center;

    i {
        background: #007DFF;
        height: 100%;
        width: 0.375em;
        border-radius: 0.25em;
        display: inline-block;
        -webkit-animation: stretchdelay 1.2s infinite ease-in-out;
        animation: stretchdelay 1.2s infinite ease-in-out;

        &:nth-child(2) {
            -webkit-animation-delay: -1.0s;
            animation-delay: -1.0s;
        }

        &:nth-child(3) {
            -webkit-animation-delay: -0.8s;
            animation-delay: -0.8s;
        }

        &:nth-child(4) {
            -webkit-animation-delay: -0.6s;
            animation-delay: -0.6s;
        }
    }
}

@keyframes toast {
    0% {
        top: 0;
    }

    100% {
        top: 15vh;
    }
}

.toast {
    display: flex;
    white-space: nowrap;
    padding: .75em 1em;
    background: #fdf6ec;
    color: #eebe77;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 99;
    border-radius: 0.25em;
    top: 15vh;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
    animation: toast 0.5s;
}

.toast i {
    display: flex;
    align-items: center;
    margin-right: 0.5em;
    width: 1em;
}

.toast span {
    font-size: 0.875em;
}